﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MadLibrary.Managing.Products
{
    /// <summary>
    /// Holds and manages product.
    /// </summary>
    public class Product
    {
        /// <summary>
        /// Gets or sets the product ID.
        /// </summary>
        /// <value>
        /// The product ID.
        /// </value>
        public int ID { get; set; }
        /// <summary>
        /// Gets or sets the product name.
        /// </summary>
        /// <value>
        /// The product name.
        /// </value>
        public string Name { get; set; }
        /// <summary>
        /// Gets or sets the product category.
        /// </summary>
        /// <value>
        /// The product category.
        /// </value>
        public ProductCategory Category { get; set; }
        /// <summary>
        /// Gets or sets the product description.
        /// </summary>
        /// <value>
        /// The product description.
        /// </value>
        public string Description { get; set; }
        /// <summary>
        /// Gets or sets the product cost.
        /// </summary>
        /// <value>
        /// The product cost.
        /// </value>
        public double Cost { get; set; }

        /// <summary>
        /// Initializes a new instance of the <see cref="Product"/> class.
        /// </summary>
        public Product()
        {
            this.ID = 0;
            this.Name = "";
            this.Category = new ProductCategory();
            this.Description = "";
            this.Cost = 0.0;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="Product"/> class.
        /// </summary>
        /// <param name="ID">The ID of new product.</param>
        /// <param name="Name">The name of new product.</param>
        /// <param name="Cost">The cost of new product.</param>
        public Product(int ID, string Name, double Cost)
        {
            this.ID = ID;
            this.Name = Name;
            this.Category = new ProductCategory();
            this.Description = "";
            this.Cost = Cost;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="Product"/> class.
        /// </summary>
        /// <param name="ID">The ID of new product.</param>
        /// <param name="Name">The name of new product.</param>
        /// <param name="Category">The category of new product.</param>
        /// <param name="Description">The description of new product.</param>
        /// <param name="Cost">The cost of new product.</param>
        public Product(int ID, string Name, ProductCategory Category, string Description, double Cost)
        {
            this.ID = ID;
            this.Name = Name;
            this.Category = Category;
            this.Description = Description;
            this.Cost = Cost;
        }
    }
}
